More cleanup and documenting.