[WIP] Preprocessing refactoring

Fix issue #2238