Started restructuring for async support
Closed #6