#17 - added testcases and refactored the attachment splitter