Cleanup everything and move .js out

Here's the cleanuo I did.