[sd] classes for all and a little statefulness cleanup