[WIP] Dshape refactor