Fix directory handling, TC selection
Fix AI
Use vecs more
Optional tracing for replay debugging