Change callbacks from function to delegate.