debugged: crashed with several empty lists so added controls
Removed comments and superfluous code