Refactoring tooltip code + display CMD on mac