This feels terrible.

I need to get my head around mixing async and sync code in the same
file. Because this is so badly cobbled together I hate it.