Reworked code for doxygen.