yet another massive rewite, added massive amount of new code minly for debian package complience, this is not final version, but is stable, ie it works