Squash messy commits from PR 5
Restore Wheezy compatibility & fixup