Have enter and leave methods for modes.