Refactored to use requirejs for queryRun.js