Added common defines for chars.
Beep when movement in history tries to get over limits.
Fixed re-adding of invalid escape sequence.
Added comments.