More type improvements