Refactored some imports, added recursion for ODEFactory