Cleaned up code and moved around files

Cleaner code, and separated out vendor JS