Begin conversion to AMD/Commonjs since typescript modules have some crazy errors preventing proper complilation. Also makes it easier to work with for JS