Moved the pre process functions to a static class. And dynamic
filenames.