Improved platform handling.
Improved window system handling.