Add middleware base abstract class.