Fix bug parsing numbers and a few smaller fixes

The text should probably also mention to reset errno before using it in chapter 8.