changed URLs for displaying code

I also updated the links to the book - replaced it with the code URL where appropriate and kept the links to the book when referring to an example from a previous example. I included some notes in the _posts files for clarity.