Add functionality to change mode at runtime

- add `set_mode()` method to enable changing mode at runtime
- api_domain & api_endpoints are now private,  are now private, use
set_mode() to alter them