Implemented the controller protocol.