Various refectorings.