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.