Feature/validation

WIP - up for review.