More TypeScript cleanup