Improvements on validator