Some type improvements