More modifications based on feedback by Jonathan and other tweaks.