Added sort by title/date functionality.