refactored event_page to add all listeners in top scope and be more understandable