Adding a mode flag and the params and such to support switching between production and sandbox mode