Updated DAM implementation.
Moved some common methods around.
Added a method for getting an attribute stream.