Refactoring to use validator and JsonServiceClient