Refactor with some new features

add: 
* debounce and throttle
* multi-instance support
* print logs when debug