Sencha Touch 2.2 compatibility; code formatting and fixes according to jslint