More cleanup and docs.