Fixed ASCIIRect, added some more predefined states, improved cursor positioning