Changed approach to define record type fields.

Now all fields must be set as positional arguments, and any default values must be passed in the keyword arguments.

Also refactored code around type creation to extract methods and remove useless comments.