vid-969 cleaning up validation code