Fix compile warnings by removing unused events and renaming a field.