Speed the printing of toShorterString().
Remove unneeded import
Add generic type
Correct spelling in Javadoc