TypeScript implementation

Changed all classes using TypeScript