Moved main to pipeline for clarity