Debug counters and non-C99 changes...