Refactor events page