routine code cleanup