Made sure it find the query to visualize. Reordered methods to follow the execution order better.