Some more foundational work, added doc subdirs for doxygen and sphinx.