Adds attachment collection, fixes #2, bug fixes
Normalizes line endings