Fixing some bugs in optimization, fixing status functions so that they dump correctly (although some things are deferred until the Stats is accumulator-based).