Add histadd.
Refactoring.
Fix typo.