A little bit of code cleanup
Added async unittests and fixed bugs in async calls and async-method generics.