errors - moved error saving to function.
Various session changes.