Implemented basic data structures for query graph