Changes based on madmaxoft's nitpicker notes.