Clean up code.
More cleaning up, no major changes.