Made changes per Ben Yates submission. Closes #47.