Changes example to use Omniscient.js
Adds missing closing tag
Refactors and cleans up duplicated code