Small enhancements and security fixes