cleanup
added more Doxygen documentation while at it.