Switched dd to ddrescue and cleaned up more code