Substantial refactoring, primarily with comparative analysis code