Use more function composition in planning