Doxygen and other code cleanups