Fixed async issue and simplified tests