refactored _encodium_fields to be a dictionary mapping names to definitions
updated socket test