Created main controller