Instrument with log4net

And remove extraneous database session handling code.