wip, some style, some fix of attachment.js