Optimizations moved to opt directory.
Seperated pruneSteps as a util template.