Added insert statistics calculator and required functions.