Added __str__ methods and removed output()