Fixed #82. Refactored existing tests to use history