gc code cleanup