Three little patches

Hi:

Here are some improvements to the code and the buildsystem that I would like you to review and commit.

All changes are described in the commit messages.

Thanks.