some type improvements