Fix a few warnings
Warnings in example
Adds *~ to .gitignore