Move sort elements into detail model