Fix bugs in handling of pen tool
Fix issues with handling of popups
Fix issues with repositioning of selections
Implement resizing of selections