Early code for trails demo.