Initial sort version. Issue #79