wrapped my head around PartialFunctions and refactored ResourcePlan to use them. fixed unit tests.