Add sorting of models. closes #62