A first rough pass at some design
Fixed merge