Switch from TypeScript to JavaScript, use typed arrays for everything.

Also better packaging.