clean up demo page code