The session level locks are no longer needed in the schemarouter. Also cleaned up some parts of the code.