pretty_print() method is now prettier. Added index_of_next() method.