Moved view-index js back to main

This will probably not work anytime soon due to the current setup