API refactoring - use a validator object, clean up a bit, etc.