Small modifications, added removeEndlevel function, increased stability of TDSIG, slightly improved pp