Several general improvements