Extracted statement generator.  Wrote initial test