Fix error in val.
Minor cleanup.