commit

significant refactoring, updates to typescript.api and a new typescript
build utility. modules split up and dependencies sorted out.