Made refactor of AnalyticTextViewer