brief refactor of security components.