Testing infrastructure

Methods all in tests, events not yet implemented in ttt