Made a bunch of changes, and more doxygen