Ported ZoomTool to TypeScript