Rebased to current master. Previous version: id:"1307016220-17509-1-git-send-email-pieter at praet.org" Discussion: id:"1317660447-27520-1-git-send-email-schnouki at schnouki.net"