Sd merge

Remerged the SD library to pickup changes since it was ported