Adding basic sort, some filtering