Minor changes helpful for viewing output in octave.
Added ability to handle null state to sampler, changed test code to use it.