Library for making middleware chains