Added Yipfile.
Fix compilation errors on OSX.
Fix line endings.
Fix compiler warnings.