Improvements, and security fix