fixed time encoding bug wrt uint size. Added broadcast msg encoding/decoding code. tweaks