Added an assert to prevent nil completion blocks in the async image API
Added documentation comments
Introduced a function for calculation random numbers and extracted all magic numbers to constants