Address PR comments; fix validation bugs.