Added support for delegate method using completion block. Useful when having jobs that happen asynchronously such as an HTTP request.