Very light refactoring of the Security code.