Code refactoring - Home page

Signed-off-by: Davinderpal Singh Rehal <davinderpalrehal@gmail.com>