Made a function of controller private and removed a Debug function