More cleanup and comments