Fix up validation and related things