Refactored new code

Refactored new code to implement source maps, removed compiler.js as
it's now just a function within index.js