major refactor to standardize request context