Created MVC structure. Moved logic out of routes into controllers