src/cod: Make things asynchronous