Client-side code cleanup