Rename function, move eventListener to correct place