A few changes to be able to use sandbox and production API