Started more cleanup of the code.
Finished the code cleanup.