Move history to utils