Wedge support

I mean to merge this before I went on vacation! I want to get this merged before I start into the write stuff.