Changed name of main method to controller