public code cleanup