Start refactor
Complete rewrite using TypeScript, as well as some documentation updates