Released under LGPL. Added some more code.