Added text tests and fixes