Fix sending empty messages, move UI in another file