Fix inconsistent line ending
Fix a few compile time warnings