Clean up some old/deprecated code, and add dependency documentation