added some parentheses, removed unnecessary definition_validators code, changed required options check to a case statement