Tooltip refactoring: removed code duplicates