Improved security framework