Changes Express middleware to be asynchronous when defining models