Validator useless code removal