Moved tooltip code to a little more sensible location.