Added test_whole_cases and fixed minor bug in read_case