Adding delegate methods for responding to user selection.