rm unused
add a counter in metadata
use head to give metadata about types