Some Testing with code, implemented use of events in test.py, added undo to test.py
merged fix from master down to working