Improved switching between different APIs.