Validation refactored