Fix all tests and add more support for ANSI.