Refactor a few things.
Fix window now showing because of WM_NULL.