Cleanup of doxygen, mac stuff and comments