Management of events

Change-Id: I941644e1931e19152316ce9b1cbd92d99a804725
Manage uri queries

Change-Id: I6fb73785604c99b6bfc825cdfe8c581dd83b8ddb
Refactorized query management function

Change-Id: I57a6eb3227c8d14fd12e8bbf0ab1a5c455f0a1c2