refactor the analyzer stuff