Improved demo code for display on mobile devices