Change internal serialization of TypeSignature back to a string

maybe add `toString`, `equals` and `hashCode`