Renaming some variables and switching to indexes as the additions and removals.