some small cleanup and define WIN32_LEAN_AND_MEAN