[WIP] Refactor MSM

Wait, doesn't this return `T` and `pi`?