Many changes:

sdX check
sdX selection
cleaned up a ton of vars