Fixes 'this' selector and adds popup manager events

Fixes #10