Refactor boundary validator, cleaning up