Change some function names and fix some formatting.
simplify demo
Merge pull request #5 from balshetzer/master

simplify and clean up