context_analysis: move the class into the cpp file