Converted to use TypeScript.