refactored some code + minimal documentation for AsyncLock