Update q5.cpp to use latest CaseUtilities