Added versions that separated synchronous from asynchronous code.