Implement history handler.