Main Javascript

Holds lots of stuff