Some work on plotting graphs for another simulation (#31). Also some refactoring.