Added preamble and acknowledgement messages
Added input of second text attribute
Various minor changes