Backbone JS task. Initial refactoring to Java.