Modified types to be much more robust.