Fixed Windows support and fixed a couple of warnings.