Refactor validation service