Tidy away the tooltip logic.