Restructure and cleaner event delegation