updated caching and styling logic. Updated demo.html.