Fixed tests and done chapter 6