massive changes including middleware, context processing and initial data
merged with dev-alex