Clean up some if-else ladders.
Merge WIP on hjb module and updated spline module.