Migrating to backbone.js