Refactor execute.
Refactor for readability.
Refactor the operations into a hash of functions.
Execute the operation in the after_process filter.
Move more things around.
Consistency.
Consolidate setting the historical result.
No need to save the effort multiple times.
More cleanup.