Added cannonical attachments, fixed class structure.