Respect the window style mask the window is initialised with, minor logic and other changes
Merge pull request #2 from sebj/master

Minor tweaks (comments, concise code)