truncate text. comments. remove some dead code