Code clean

Reproposing code clean in one commit. unfortunately line endings problem still exists...