Small fix in meta structure factors to not use imports in generated code (as this created compilation errors elsewhere). TreePotentialSpec now compiles with the optimized objective as well.