Separated validation and instantiation.