Export to library and fix doxygen