Moved print statements from constructor into the toString() method.