Cleaned up liver_sd.r