Added the event as a parameter to the functions
minification update