Revert to earlier code and improve.