cleanups, preparation for new editstats