code cleanup lib