Added commenting for get_fields sub