added web trace framework + many optimizations