remove unused and referenced data