Refactor with Typescript
Finished typescript architecture