Finished chapter 7 (added validations and unit tests)