Key fixes, adds undecorated windows

Please see individual commit messages for details.