Cleaned up controller (rename and removed unnecessary code