some code cleanup
ignore vim swap files
minor fixes in examples
simple refactoring