Various refinements and bug fixes for rliSGP and outputSGP RLI functionality