Added performances tracking features, misc debug & optimizations