Refactored cleanup_snapshots & warning_size in Command.