Convert to TypeScript, clean up, and update README