Improvements in asynchronous classes.

Moved base classes to the .NET API project.