documented a lot with doxygen. need to test to make sure i didnt break anything