split view and listener
extract ui translation to translator
fix issues reported by jslint