Fleshing out validation code