Cleaning up code and incorporating changes to the accumulations.