Add get_name and fix get_next_object.

TODO: Need to add defines or enum for nameType.