Made loading asynchronous and bound the middlewares to their corresponding domains