Refactoring to Backbone/Underscore JS

Refactored much of the existing code base into more friendly Backbone
JS and Underscore JS frameworks