Rework cases with names and fix cache bugs