Adding reverse lookups to namespace map

Also changed serializers so they don't need to be aware of the nsmap's implementation.