Refactored AQL queries for RevisionAPI