Removes old statetree references that remained