Refactoring pipeline into a standalone package