They put away the foreign gods from amongst them, and served the Lord; and his soul was grieved for the misery of Israel.