Improve add/remove handler