Added a few methods for message and attachment classes. Added tests.