Shuffle some internal stuff to API so that modules will compile