Iteration B1. Add validation and fix tests so they pass validation.