Refactored server-query validation into this service