Organize code, update demo page.