Separated SDM v2 stuff into 3 files