Remove unnecessary changes. More importantly introduce weakrefs so that we don't have Element instances that last forever