rearranges file structure of js views
Fixes some bugs