Fixed #14 by removing hash set that's no longer neede.
Added history mgmt functions.
Added history file management and fixed #9.