Various fixes

Mostly to make it easier to support Debian in the future (We intend to use this module there)