clean up code in CT_proc module