Discarded use of a static variable and renamed event function to be less ambiguous