Refactor AnalysisPage