Refactor: move analysis to Analyzer class.