update example
Adding jshint and karma.
fix spelling
clean up  code with jshint
clean up and update docs