Changed it to MVC structure