Fixed bugs related to statements.  Added support for throw.
Now catching thrown non-Errors.
simplified session state.