Cleanup encoding output