Use proper event listeners
Send name and message as separate arguments