Fix for #186

Implemented last window caching with a single instance of the tooltip window

Also added a failsafe on displaying empty tooltips
Cached last tooltiptext
Cleaned up the code slightly(removed unnecessary type signatures and sprintf )