Use more function composition in the planning
Compile on Java8. Fixes #2149
Merge pull request #2150 from jakub-/planning-refactor

Use more function composition in planning
Merge pull request #2156 from chrisvest/2.1-fix-build-on-java8

Compile on Java8. Fixes #2149