widget code review cleanup