The current pre_process() is doing way to many things. We should break down these into couple of small functions instead.
The current pre_process() is doing way to many things. We should break down these into couple of small functions instead.