cleaner timing code; new example to assess segfault; cleaner callback code