Changes to how the p matrix is handled

GilchristLab github repo has fallen behind the version currently being worked on, and I want to commit some new changes that I made. This version is definitely good, we've been working with it.