Made some improvements per Jay's suggestions.