Incorporated Caius's comments on pull request #13