Make data requirement an explicit validator.
Convert validation functions into classes.