centralized the tooltip creation and placement logic, and configured it to move out of the way when it would otherwise render off screen