Refactoring of the old analysis pipe

More modular, supports multiple pipes.