Fixed typos etc. Moved motivation to the beginning of chapter
Added content to defect preventing