Refactor to implement class-based validators