Finished printTree and printList methods