Added async support to main module and unit testing.