further broke up the js into frag specific js files and fixed some bugs and removed some code used for testing