Fix stats labels.
General code formatting & organize imports.
Remove warnings.
Clears stats when deleting partitions.