Implemented changes proposed by gr2m in Issue #1.