Performance and other improvements on validation