Add newtype support (closes #233).