Finish pipeline v1
Refactor and add comments
Refactor