* refactoring code
* added typescript
* moving all to native javascript