More validation and error checking.