Gh394 git history

#394
historyData.getItemAt(i) is used twice and to improve performance it is better to store it in a local var