Adding a handler, var use improvements