Cleaned up the controller class, removed non-working code