fix for lists option;
code improvements;

https://mediawiki.org/wiki/Special:Code/pywikipedia/11752