Sort out some of the internal dependencies