improve controller code, libraries, and add basic backbone.js models