Improve on #69, using setdefault() and update example project

Camp site rule; leave things tidier than you found them :)