Cleanup traits check code