Added unit tests for controllers.js
Removed unused variable.