Refactor tooltip