Improve events handlers