Implemented sort filter. Resolves #47