Reorganize code.
Replace custom validation with revalidator.