Added rudimentary validation to models