Add DynObject class and some tests.