Minor change to example code.
Added vim swap files to .gitignore
Fix compiler warnings
Added test, demonstrates infinite loop