None of that matters to heroin users or users of more powerful prescription opioids because codeine will not give them the high they want. A better model would be something along the lines of marijuana dispensaries or state-run liquor stores, where legal sales can be made but with added levels of difficulty/obscurity. That kind of rigid legalization scheme probably wouldn't kill the black market, but it would absolutely save lives. Many people who are dead today would still be alive if they could have simply purchased a safe version of the drug they were going to do either way.