fixed bug in bower.json and refactored controllers.js