Merge "Wedge refactoring to handle signs better" into nextgenv2