Creates main controller and index view