Refactored carve functions