Refactoring and upgrading the demo page.