Fix ParType creation and add end time to case model