Merged in some suggestions from Phil