Cleanup and pulling js into a different file

Still not ready for primetime til I test it on some other platforms
Removed IntelliJ project files