Changed order of split-by and overall code to flow automatically. Objects created by split-by can now be used by the overall code without a problem. Still need to fix the code when we are getting NAs for 95% CIs. The code stops when this happens.