Added block-based callbacks in addition to delegate.