Improved performance as described below.

Fixed async issue.
Fixed empty results issue (will return an empty array).
Improved multi-thread support.