css: split core styles and demo styles.
index: remove double loading of CSS and switch to function call.
js: initial stab at refactoring.
Merge branch 'pr/4'
tweaked html and updated pr/4 branch