improved tooltip positioning performance
minor code cleanup