Fix/asn1

Some minor clean-up/fixes
Cherry picked the additional patches of PR #13 by @ccbrown
Changed the ASN1 type to be a typedef instead of an anonymous enum which allows the compiler to do further checking

Any comments?