Changes to fix api caching and some paranoid initializing of variable prior to reuse to try and prevent Runtime Error responses from CCP API servers