Changes following comments by @EricRothstein