Simplify tooltips code