Minor revisions to code