Main method now in controller