Better history handling