Minor tweaks - code is a little more refined.