Refactor Security done.