Split up Pipeline optimizations into separate functions