Fix scope of var to be local
Make examples executable
Merge pull request #4 from matthijsgroen/fix-documentation

Fix documentation