Adding doxygen documentation to library and various fixes