Started to refactor attachments. Not stable yet (not enough replays to test)