refactor analyzer