Improved ToString method.