Fix line breaks and update function callback