Add event listeners for line and score change.