Default environment to production if not given in params, move error messages to their own module, refactor client tests to check that error messages are present and give better names to fixtures