Refactor SD Card Utilities to C++ class