Added DynamicType and bug fixes.