Partial fix for Issue #9; tests for new code.
Merge pull request #11 from BenChampion/issue-9-ggo-mem-leaks

Partial fix for Issue #9; tests for new code.