Refactored wedge and simplified