add cmdtype & general cleanup

cmdtype identifies commands within the messages received from scratch in
the form <type> "<message>" and locates there positioning to allow
splicing later. commands currently saved in a list <type> <location>
<message>
broadcast command fixed & cmdtype calls broadcast
debug changes
Revert "debug changes"

This reverts commit b201e083110065a88d2bcf6d914a88279e3ca854.