Moved message sending functionality to it's own area, called from both single-line and multi-line inputs. Also fixed npmsg.