added final doxygen comments and cleaned up unused code