Refactor case with Class.