more refinements to examples/ui
refactored examples/ui
refactored examples/ui
refactored includes/ui.js