Fix spurious cast to byte, and ambiguous expression expecting & to have higher precedence than >>
updated tests
some more test harness formatting stuff