Started async tests. Fixed several bugs.