Preprocessing with complete functionality.