Improved security. Other minor changes