Updates variable names to remove spaces and match variable IDs