fixed problem with nested templates
DO::ATTR_EMULATE_PREPARES, false
Factory, DI and Popo cleanups
merged development
cleanups after merge