Simplify event binding code