Most of the work from Darcy Watkins <dwatkins@tranzeo.com> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>