Move general methods under utils file

As a follow-up to the patch [1].
Better to move these methods under utils file
so other classes can benefit from it.

[1] Ia0cf15210e697988cd54ae82db8bb76aa17a5996

Change-Id: I31322352dcd7982443fa1f590a643b341c059ff0
12 files changed