Adding doxygen comments to missing parts, moving some #define