Removing legacy metrics code.
mcenc: check allocations and cleanup