cleaned up, fixed tooltip bug, refactored a little