refactor to allow easy change of account and application credentials