Made a few dependencies optional and removed others.