cut down on cloning by keeping state in form only instead of fields.  add middleware tests.  closes #1