#3 Refactoring MonitorService, addition of the QueryService