Cleaned up some of the DUE/Mega conditions; shuffled around sd card code a little bit