Use AttrDict even when accessing hash attributes

also make AttrDict writeable