simplify test code
[de] fix some recently introduced false alarms
[de] fix some recently introduced false alarms
[de] fix off-by-one and formatting