Completely refactored the module

* New API
* Compatible with ti 3.X