Move code around and gate the internal functions used in our own tests so we can make the testing backend public