More work on the session interface.