global code cleanup