More cleanup and comments.