All functions defined.  Has race condition that I can't track down.