Reduce the complexity of asynchronous code