Uses browserify and refactors into seperate files.