Windows implementation fixes and improvements