Partial tidy up and improvement of winapi integration tests