Move event handlers to load method to avoid global effect