Code block Update

Moved all code out to separate file with the idea that we could actually run the code and generate the output automatically. Also standardized the display and added line numbers to the code blocks. 

@Cadair could use some help here. We need a way to run this python code and generate the "pretty" python code text files for the display. I've poked around to figure out how to do this but have not found anything so far.