Merge pull request #1026 from nupplaphil/task/security_restructure