preprocess: Implement preprocess.