Added Rest querying for esp. Added controller handling in executeQuery.