more refactoring. moved the output stuff for samples/histograms into an Output module for pages
returning canvas for output methods
can now pass false to output methods to retrieve canvas without writing to a file