Added most expensive functions. Improved mongodb tracing