I spent a lot more time inventing middleware than I expected