Added more validators.

Added more validators and some other code changes.