This is currently incomplete and needs work to make sure that popups stay inside their parents current output. fixing popups, wip