Trying to implement the MVC pattern properly

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