added document dowload functionality, added attachments controller