WiP refactoring the pipeline (now mostly selecting objects)