* Move option parsing and finding longest title into their own functions.
* Use function local variables.