Fixed max-overhead initialization and replaced event numbers with macros