Updating class renaming logic