Various event binding fixes for context menus. It's still a mess, but it's not as bad of a mess.