Updated Case Recording Method

Updated the way we determine what gets recorded by using the collapsed graph. Also use an encoding to store float arrays more efficiently in JSON files.