cleaning out unused elements