refactoring the TS  code to use internal modules only and removing the dependency to require.js.
Merge remote-tracking branch 'origin/master'