Mostly refactored to a proper pipeline. Still need to organise proper pipeline setup and fix route tests