Refactored code to allow either sandbox or production tokens without changing the code.