Move validation methods to class and make them public