Remove deprecated variables and move all references to them to the new ones