Conversion to force functions returning values instead of storing them.

This still doesn't actually work yet in that minimize.cpp needs to be
updated to reflect these changes. As with most commits in this branch,
this is mostly a checkpoint.