Remove unnecessary event handler code