Versioning and refactoring to get tests passing in all environments