Filled out implementation of protocol methods.