Added a heap of stuff following daves examples from the book