Since pContextDepth is only accessed within the onConsolePrompt function, couldn't it just be a function scoped static?