add RSEncode to quorum
address bugs/improvements from PR comments