Some cleanup of types