Fixed typo.
Refactored HistoryController.
Fixed tests.