Added ability to toggle api and setup