model.py: Record class: more logic implemented in merge function