Cleanup XLIB
Fixes a Windows regression
Merge pull request #2 from sorlok/scaling_fixes_2

Fixes a Windows regression
Merge pull request #826 from RobertBColton/master

Cleanup XLIB *DO NOT MERGE*