Refactored WindowIOController to not use WinAPI