This exposes internal functions for testing by splitting the implementation & internal API into separate files