Added support for windows builds
Major cleanup etc.
Updated .gitignore for Xcode