Refactor factories with inheritance. Update specs.