TypeScript files refactoring