Changed to proper MVC structure.