Streamlined code with an important typo fixed

I now understand PHPlist a little better. So I have been able to remove
a lot of unnecessary code.