Move KO app to external JS