Fixed some errors, memory leaks in HistoryManager. Added comments and edited code in HistoryManager.
Fixed some errors, memory leaks in HistoryManager.
Added comments and edited code in HistoryManager.

WheretIB/nullc,WheretIB/nullc,WheretIB/nullc,WheretIB/nullc,WheretIB/nullc,WheretIB/nullc,WheretIB/nullc