Restored the original synchronous API and added a simple asynchronous API