remove unused data and typeable instances