Fixed plugin so it doesn't eat keys.
Fixes for multiple windows.
Removed debug code.