"And here we must distinguish such punishments as are penalties and nothing else, and those which have for their motive the amendment of the sinner, and are called medicinal." . . . .