flattened getDependencies and injectDependencies to prevent nested methods within define method.