This version is more logical, less ugly, and incorporates  and  as described in the Debian manual.
Merge pull request #42 from sahal/master

This version is more logical and less ugly