Updated with corrections from issue #8.