Tidying up of types