Refactor pipeline steps into importable module