Shape hit refactoring