Added missing middleware, flattened entries view