Move slide and change event handlers into one, global, function and add wrapper