Accept domain, selector and RSA private key as agruments. Set defaults
if none given. Refactor and simplify code.