More cleanup and doxygen comments