Moved numerous definitions from sd.h to sd.c - no need to be public