Start documenting for doxygen.
Fix arguments in doxygen documentation.
Document a little bit more, some extra error handling in settings_save, and some cosmetic fixes.