Refactored preprocessing rules