Revert "Revert "Tentative SD implementation""

This reverts commit 3f3466d708dd3fa711f6bcfe2fee4ff9518afada.