Migrate JS code to Knockout.js.