Replaced conditional with guard case.
Made line endings uniform and added final end of line char to end of files where it was missing.