Added tests for ANSIString, and fixed some bugs for it along the way.