Refactor output messages