Fix line length
Refactor time clause generation out of title code.
Fix some formatting
Typo app_type -> api_name
Make list of "the" countries a set
Initial attempt at untangling title generation code.