Updated structure to MVC style