improved API for setting preprocess context
Merge branch 'develop'