refactor validator files