Putting code inside code blocks.  Also adjusting simplification threshold.
Changes required to run without --pylab inline, not sure why importing numpy became necessary