Fix tooltip stuff, refactor