minor refactoring.
Created a decent demo page, found and fixed a bug. done.
demo plus minor refactor