Refactoring factories and constructors.