Refactored to use grunt and divided into separate files that compile to one file, ugly, but slightly better