DRYed out some of the code
Merge pull request #14 from boylea/demojs_cleanup

DRYed out some of the code