widget code reformatting