moved segments offheap, tests are workign finally, optimized stats, more cleanups comming