will be some common utility
Refactor:
- require external library first
- no trailing semi colon and comma
- deferred.reject dont have to encapsulate xmpp's error in a new error
- file names and structure
- etc