Fixed positioning to properly adjust according to the tooltips configuration. Refined event triggering to accomodate both text and input fields. Some of the logic needs to be cleaned up and shorthandified.