Fixed enums for new namespacing rules

I also shortened the names of the variants to avoid repeated words (eg: ParseError::ErrorInvalidLength -> ParseError::InvalidLength).

If this is not wanted I'm happy to change them to something else.