Large refactor

Moved a bunch of stuff around and combined the processes.  Also added new R script.  Expect a couple of issues.