add unit tests, full support of async calls, add logs, code refactoring