Move preprocess functions to their own file.