Tweak markup for attachments edit
FIXUP pull out old macros/tests