Refactoring in cleanPacmanCache code.