Chip: refactoring