Changes according to the suggestions in comments.