Changed interface to use delegates.