Improved __str__ and rich comparison