Add middleware related TODO