Removed a small bug in calling _updateHIstory() and commented out unnecessary statements.
Also introduced a few break statements to prevent redundant iterations.
Merge pull request #71 from SharanyaH/develop

Removed a small bug and improved efficiency a tad