Chapter number 3 + some fixes