Porting project 1 to Backbone/phonegap