Remove the rest of the dependency code and other cleanups