Implement saving/loading of corprus stats, remove redundant code