Validation

Implementation for #38
Not using this apparently, can get rid of it