Added doxygen comments for most stuff