Refactored queries to service + global error handler
changed is valid to validate
changed is valid to validate
global error handler