ZKL: HistoryManager.cs: implement suggested changes

Tested it and it is indeed slightly (a tiny bit) faster than previous implementation & 2 line less.