Moved script to .js file. Moved editor markup to EditorTemplate