Minor refactoring and doxygen documentation improvements