Refactor code; still need to combine sort & filter funcs
Session carries to other views