-- GEP-6, code cleanup and customPre and customPost fixes