refactor controllers.js for improved readability. remove unneeded files.