Reversed switch subscripts: during event 1, switch 2 is written to; during event 2, switch 1 is written to.
Added a test to ensure that tvar structs maintained atomicity.
Minor modification: using atomic structs.  That way, ensuring that bug that I'm encountering is not the product of a partially updated internal swtich.