refactoring, basic testing, move applyBindings to index to avoid blanketjs/knockout issue