Improved tooltip code.