Clean up and format code.
Clean up and document code.