Add plan statistics + minor fixes