cleaned up the windows code