Code cleanup
Beef out DynObj and add some tests