Refactoring

Refactor methods which created their own attachment map to use
createAttachmentMap method