Misc changes

Fixed line endings, my editor suddenly changed them to CR+LF
Improved string substitution method, now applies to multiline files