Made a separate Javascript file

I like doing this, it looks much cleaner