Refactor of validation controller.