added history update - a utility function, also added logic to the vertical arrows. and last but not least, corrected a bug we had with backspace by added memmove in consuleintr