cleaning widgets code