Reorganised, added book sample code

Reorganised performance code to new package structure, added sample
code from Chapters 3, 4, and 5