Added analytics and complementary middleware