Analysis refactoring ready for public tests