Cleanup id ref. Use type views instead