Tweaks based on Evren's suggestions.