Refactorings based on the chapter writing

mostly renaming / reordering / typos