Completed implementation of HistoryData.
Fixed issues with Java 1.7/1.6 compatibility.
Added comments.