Added middleware and context processors