Original author:
     Torbjorn Tornkvist

With patches from:
     Simon MacMullen
     Manuel Durán Aguete
     voluntas