More cleanup and better initialization of static variables
Updated estimator version, merged master