Refactoring and added pipelines