ASN1 changes

Hopefully this fixes all the issues in #275 but I wouldn't consider #275 completely resolved yet so idk.