Changes based on suggestions in comments

from 9639406e2cb5d58245c8e839c2ee9295dde3915f