Mostly this was to make testing easier without monkeypatching.