Complete another layer of validaton code

This is still very much a work in progress...