refactored controller and deleted unused files/folders