Contained draggable popup and re-calculated how the popup's initial posi...

...tion is calculated.

Fixes #145