ensure that fake API is fully loaded before application

Sometimes, graphs wouldn't load when using fake API. I believe that this was due to a race condition in loading the fake API and the application. I've changed the bootstrap process to ensure that the fake API is fully loaded before the application controller is loaded. I've also moved the API switcher logic out of the fake API.