add js framework and made it work
move and organize initialization of controls
js refactor and clean up