move main to app
linted with jshint