Mass converted EOL from windows to unix.
Refactored some methods.