Fix unused and reorder warnings.