Added a custom context object to preprocess().