Added truncated text test and small cosmetic changes