some cleanup and comments in get_titles.py