Merge pull request #8 from gbbr/pool-c7

Changes to make the example more idiomatic.
Removed variable from global scope