Code cleanup and file EOL endings