! fixed bug in computation of seglength
- removed a few debug messages