clean up in DEntity

add .id
rewrite .touch()
avoid check in .apply
change exception handling in .get and .getAs