refactor(tools): move code into functions to make them re-usable
refactor(tools): move code into functions to make them re-usable

nfrechette/acl,nfrechette/acl,nfrechette/acl,nfrechette/acl,nfrechette/acl