Code refactory partial.

Signed-off-by: JerinJ <jerinj@cybage.com>