Added validator for named value
Minor PEP 8 cleanup