clean up wasted elements