Added database documentation
Fixed get_attachment bug