Code Re-structured. 

Independent classes have been included to take care of respective
actions. 

Change-Id: I418fca750a10f677a3914419d874d1ad98960f90
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com>