Remove more old code
Add attachments test case